package com.xlong.core;

import org.springframework.stereotype.Component;
import org.springframework.web.context.request.async.DeferredResult;

import com.alibaba.fastjson.JSONObject;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.xlong.BeanEntity.ResponseMsg;

@Component
public class CommUtils {
	public static final Cache<String, DeferredResult<ResponseMsg<JSONObject>>> SETTABLE_FUTURE_LOADING_CACHE = CacheBuilder.newBuilder().build();

	//超时结果
    public static final ResponseMsg<JSONObject> OUT_OF_TIME_RESULT = new ResponseMsg<>(-1,"请求超时",new JSONObject());

    //超时时间
    public static final long OUT_OF_TIME = 3500L;
}
